package org.jivesoftware.test;

 import org.jivesoftware.whack.ExternalComponentManager;
 
 import org.xmpp.component.ComponentException;
 public class Main { 
	 
	 public static void main(String[] args) {
		 ExternalComponentManager mgr = new ExternalComponentManager( "192.168.0.101", 5275);
		 mgr.setSecretKey("chat", "123456"); 
		 try {
			 mgr.addComponent("chat", new ChatComponent());
		} catch (ComponentException e) { 
			System.exit(-1);
		} 
		 // daemon 
		 while (true) try {
			 Thread.sleep(10000);
			 } catch (Exception e) {
				 
			 } 
		 } 
	 }
 }
